import { getTaskById, getRecentExecutions } from "../../../service/scheduler"; export default defineWrappedResponseHandler(async (event) => { const id = getRouterParam(event, "id"); if (!id) return R.throwError(400, "Missing id", null); const task = await getTaskById(id); if (!task) return R.throwError(404, "Task not found", null); const recentExecutions = await getRecentExecutions(id, 20); return R.success({ task, recentExecutions }); });